<template>
	<view class="home-item">
		<view class="item-main" @tap="gostart(item)" :style="{backgroundImage:'url(' + item.classImgLink + ')'}">
			<view class="home-content" >
				<image class="left-arrow" src="../../static/imgs/right-arrow.png" mode=""></image>
				<view class="item-text">{{item.className}}</view>
				<image src="../../static/imgs/right-arrow.png" mode=""></image>
				<!-- <image src="../../static/imgs/4.jpg" mode=""></image> -->
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			item:{
				type:Object,
				default:{}
			}
		},
		data(){
			return{
				classImgLink:''
			} 
		},
		onLoad() {
			this.changeImg()
		},
		computed:{
			changeImg(){
				return this.classImgLink = this.item.classImgLink
				console.log(this.classImgLink)
			}
		},
		methods:{
			gostart(item){
				uni.navigateTo({
					url:'../../pages/Start-school/start-school?item='+JSON.stringify(item)
				})
			}
		}
	}
</script>

<style scoped>

	.home-item{
		width: 320rpx;
		height: 404rpx;
		background: #ffffff;
		box-shadow: 0 24rpx 34rpx 0 rgba(60,128,89,0.09);
		position: relative;
		margin-bottom: 40rpx;
	}
	.item-main{
		width: 294rpx;
		height: 371rpx;
		background-repeat: no-repeat;
		background-size: cover;
		position: absolute;
		top:15rpx;
		left: 10rpx;
	}
	.home-content{
		padding-top:290rpx;
		display: flex;
		text-align: center;
		align-items: center;
		justify-content: center;
		color: #ffffff;
	}
	.home-content image{
		width: 30rpx;
		height: 20rpx;
	}
	.left-arrow{
		transform: rotate(180deg);
	}
</style>
